Repository navigation
feat(common): load camera frames from video or image files by their own format - #306
Merged
Merged
Conversation
jacoblambert
force-pushed
the
v1/read-lidar
branch
from
October 14, 2026 11:10
6979f4e to
a850245
Compare
jacoblambert
force-pushed
the
v1/read-camera
branch
from
October 14, 2026 11:10
21730e8 to
623f347
Compare
jacoblambert
force-pushed
the
v1/read-camera
branch
from
October 15, 2026 03:36
623f347 to
530ace7
Compare
jacoblambert
force-pushed
the
v1/read-lidar
branch
from
October 15, 2026 03:36
a850245 to
aae294d
Compare
jacoblambert
marked this pull request as ready for review
October 15, 2026 06:17
jacoblambert
force-pushed
the
v1/read-lidar
branch
from
October 15, 2026 08:26
aae294d to
7b87cd8
Compare
jacoblambert
force-pushed
the
v1/read-camera
branch
from
October 15, 2026 08:26
530ace7 to
2b599d1
Compare
jacoblambert
force-pushed
the
v1/read-camera
branch
from
October 15, 2026 10:37
2b599d1 to
a916c99
Compare
ktro2828
self-requested a review
October 16, 2026 07:59
ktro2828
previously approved these changes
Oct 16, 2026
jacoblambert
force-pushed
the
v1/read-lidar
branch
from
October 21, 2026 01:31
23eb6f3 to
c0996a4
Compare
jacoblambert
force-pushed
the
v1/read-camera
branch
from
October 21, 2026 01:31
a916c99 to
37155e8
Compare
ktro2828
approved these changes
Oct 21, 2026
jacoblambert
force-pushed
the
v1/read-lidar
branch
from
October 22, 2026 09:47
c0996a4 to
6313f6d
Compare
jacoblambert
force-pushed
the
v1/read-camera
branch
from
October 22, 2026 09:48
37155e8 to
4522715
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
load_image()int4_devkit/common/io.py: reads one camera frame as an (H, W, 3) RGB array.frame_index: the file is the channel's video (1.0), read with PyAV..jpg,.png, ...), read with Pillow. This covers 0.x datasets and 1.0 datasets whose images were not re-encoded (frame_indexisnull).Nothing about the video is set in the reader
Finding a frame
The frame's timestamp is computed from the stream's frame rate and time base (
start_time + frame_index / (rate * time_base)). The reader seeks there and decodes up to it.IndexError.Speed
Measured on 100 real j6gen2
CAM_FRONTframes (2880x1860, AV1 preset 6, CRF 26, intra-only), read in random order: 20.5 ms/frame, vs 38.2 ms for the 0.x JPG with Pillow.New dependency: PyAV (
av>=13.1)A regular dependency, not an optional extra: reading camera frames is core, and migrated 1.0 datasets store cameras as AV1. 13.1 is the oldest version checked. It installs at ~127 MB with its bundled FFmpeg, less than
rerun-sdkorpyarrow, with wheels for Linux, macOS and Windows and no system FFmpeg needed.Tests
tests/common/test_io.py:frame_index), which checks frame lookup and the color range. A frame past the end raisesIndexError.